home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48_2 / xunit < prev    next >
Internet Message Format  |  1995-03-31  |  10KB

  1. Path: seq!spell
  2. From: Lutz Vieweg <lv@muffel.hotb.sub.org>
  3. Subject:  v01i038:  xunit - The inverse to UBASE v1.0, Part01/01
  4. Newsgroups: comp.sources.hp48
  5. Followup-To: comp.sys.hp48
  6. Approved: spell@seq.uncwil.edu
  7.  
  8. Checksum: 4077776933 (verify with brik -cv)
  9. Submitted-by: Lutz Vieweg <lv@muffel.hotb.sub.org>
  10. Posting-number: Volume 1, Issue 38
  11. Archive-name: xunit/part01
  12.  
  13. BEGIN_DOC xunit.doc
  14. XUNIT - the reverse UBASE for the HP48sx
  15.              written by Lutz Vieweg 1991
  16.  
  17. When HP implemented the unit-calculation routines in their 48sx,
  18. they forgot a very often requestet function - the inverse function
  19. to UBASE. 
  20.  
  21. If you calculate with units, you will face a monsterous term after
  22. a while, because the 48sx does not "shorten" the unit-fractions.
  23.  
  24. This program fills the gap. You may type e.g.
  25.  
  26. Your input               Result
  27. ----------------------------------------------------
  28. 2.34_F/V             1:                   2.34_nF/mV
  29. UBASE                1: .00000234_A^3*s^7/(kg^2*m^4)
  30. XUNIT                1:                .00000234_F/V
  31.  
  32. I hope you can see the meaning of XUNIT.
  33.  
  34. Below is a ->ASC encoded directory, which consists of the following:
  35.  
  36. XUNIT      The main program. Uses XU.L, XU.A, U->A and ARRSUM
  37.  
  38. XU.L       Is a list of your favourite units. Edit this list, if
  39.             you want to, then call XL->A to create XU.A out of the
  40.             list. XUNIT will only try to use the units in this list.
  41.  
  42. XL->A      Creates the XU.A list from the XU.L list. This has to be
  43.             done any time you change XU.L
  44.  
  45. U->A       A subroutine that creates an array from an unit-object
  46.             representing the exponents of the basic units.
  47.            NOTICE: This one uses self-modifying ML. Do not store
  48.                    this one into protected RAM or libraries.
  49.  
  50. ARRSUM     Simply does ABS with any member of an array.
  51.  
  52. XU.A       is used by XUNIT for internal use.
  53.  
  54.  
  55. This PGM is public domain. I would like to see any improvements,
  56. especcially speed-ups.
  57.  
  58. cu, Lutz Vieweg.
  59.  
  60. END_DOC
  61.  
  62.  
  63. BEGIN_ASC xunit.asc
  64. %%HP: T(3)A(R)F(.);
  65. "69A20FF7C3A0000000408555E2144047A208E920460003392010000500000000
  66. 0000000000100000000000000010000000000000000000000000000000290000
  67. 0000000000008E92046000339201000050000000000000000001000000000000
  68. 000200000000000000000000000000000002900000000000000008E920460003
  69. 3920100005000000000000000000100000000000000020000000000000000000
  70. 0000000000003900000000000000008E92046000339201000050000000000000
  71. 0000010000000000000001900000000000000000000000000000029000000000
  72. 00000008E9204600033920100005000000000000000000100000000000000020
  73. 0000000000000019000000000000003900000000000000008E92046000339201
  74. 0000500000000000000000000000000000000000000000000000000100000000
  75. 00000001000000000000000008E9204600033920100005000000000000000000
  76. 1000000000000000200000000000000029000000000000003900000000000000
  77. 008E920460003392010000500000000000000000019000000000000002900000
  78. 00000000020000000000000004000000000000000008E9204600033920100005
  79. 0000000000000000000000000000000000290000000000000000000000000000
  80. 00000000000000000010B21307C300601425253555D460D9D20CB2A1CCD20870
  81. 008FB9760147134142348E9208A260654016914234339208A6CE164146D5CD16
  82. 4146D7CF16416EAE2D415C016FCC56FCF5FE8F2D760142164808CB2130C90003
  83. 055D81430D9D2017791CCD20860008FB976081B580824F2000E2D534B2300C91
  84. 34D91443403300C91341461648AA31C9135147C914567EF8F2D760142164808C
  85. CCD20232008FB9760AF21B5830015471B5930015471B5A30015471B5B3001547
  86. 1B5C300154714713414234ADA208A26060B1AF316414216434339208A65016F1
  87. 4234853568A6901647D811421643426AF08A26064B0169345830081AF083F000
  88. 0000000000010AF5142344B2A28B22234173A28B6611311741577AF51646C103
  89. 4339208A6F01641567AF516FAF981AF10131155793BE181AF1913517E15740E4
  90. F155479D0B3781AF1881AF096C3F34E8AF08A631345930081AF08654F34EAAF0
  91. 8A631345A30081AF08682F34ECAF08A631345B30081AF086B0F34E0BF08A6313
  92. 45C30081AF086EEE3427B018A66068BE34E5B018A6A0723064AE93BA181AF191
  93. 3517E15740E4F15548F2D760142164808C94BA08184B80181843801CCD204A00
  94. 08FB976081B5808243D200E2D53403300C913434B2300C9135147D71461648AA
  95. 31C9135147EB14567EF8F2D760142164808C6D3AAD90008A0003B000EB0009C0
  96. 00731001F100E0200B22008420000000442308E9204600033920100005000000
  97. 0000000000000000000000000000000000000000000000000000000000000000
  98. 00000000000000CB2A1B21309D3004085C4D81440D9D20E163247A20B21309C2
  99. A284E20408555E2C48B9C10A132D6E20100584E20408555E2C4D6E2010056C7D
  100. 184E203055D81476BA1C42324563284E20408555E21497632DCC0293632B2130
  101. 3A000408555E2C44047A20ADA209C2A2C2A2070000E468B01B2130ADA209C2A2
  102. C2A2070000A468B01B2130ADA209C2A2C2A20700007568B01B2130ADA209C2A2
  103. C2A2090000051668B01B2130ADA209C2A2C2A20700006568B01B2130ADA209C2
  104. A2C2A20700003468B01B2130ADA209C2A2C2A2070000D968B01B2130ADA209C2
  105. A2C2A20700006468B01B2130ADA209C2A2C2A2090000C68768B01B2130B2130A
  106. 3100508555E4944550D9D20E16329C2A24B2A21C432D6E201014D6E2010E4D6E
  107. 201024E16323C032D6E20101484E203055D81478BF184E20601425253555D48E
  108. 9204600033920100005000000000000000000100000000000000010000000000
  109. 000001000000000000000100000000000000010EFFB14B2A24B2A21C432D6E20
  110. 10F4D6E2010C4D6E201024D6E201014E16323CE22D6E2010C4AFE22D9D209C2A
  111. 284E20408555E2148B9C10A132D6E20100584E20408555E214D6E2010056C7D1
  112. 45632D6E20101497632DCC023CE22D6E2010C4D6E2010F4D6E20101490DA184E
  113. 20601425253555D48E9204600033920100005000000000000000000100000000
  114. 000000010000000000000001000000000000000100000000000000010EFFB1D5
  115. CE1AFE22D9D20D6E20100545632D6E20102497632DCC02D6E2010F4D6E201014
  116. 90DA184E20601425253555D48E92046000339201000050000000000000000001
  117. 0000000000000001000000000000000100000000000000010000000000000001
  118. 0EFFB145632D6E2010C497632DCC02B21305BF22D9D203CE22D6E2010C4D6E20
  119. 10F4D6E20101476BA184E20601425253555D48E9204600033920100005000000
  120. 0000000000001000000000000000100000000000000010000000000000001000
  121. 00000000000010EFFB1D5CE1AFE22D9D20D6E201005599A145632D6E20102497
  122. 632DCC02D6E2010F4D6E20101476BA184E20601425253555D48E920460003392
  123. 0100005000000000000000000100000000000000010000000000000001000000
  124. 000000000100000000000000010EFFB145632D6E2010C497632DCC02B21305DF
  125. 22B21305DF223CE22D6E2010C4F88E1AFE22D9D2084E20408555E2148B9C1456
  126. 32D6E20100597632DCC02B21305DF22C4232D6E201024B21305BF224B2A25DF2
  127. 2EF53245632D6E20102497632DCC023CE22D6E201024AFE22D9D2084E2040855
  128. 5E2C4D6E201024F1AA16C7D13CE22D6E2010244B2A2EBBE1AFE22872B15DF224
  129. 5632D6E20102497632DCC0245632D6E2010E497632D6E20102435702D6E20101
  130. 4D6E20102450FA11779145632D6E20101497632DCC024B2A2B21305BF229C2A2
  131. 5DF22DE0329B632D6E2010E4D6E201014EEDA1EF53293632B2130B502"
  132. END_ASC
  133.  
  134. (seems nice to compress this)
  135.  
  136.  
  137. BYTES:    #205Bh 2148
  138.  
  139. BEGIN_UU xunit.bin
  140. begin 644 xunit.bin
  141. M2%!(4#0X+466*O!_/`H````$6%4N001T*H">`F0`,),"`0!0````````````,
  142. M`0`````````!````````````````````D@``````````Z"E`!@`S*1````4`Y
  143. M`````````!``````````(````````````````````"`)`````````(">`F0`R
  144. M,),"`0!0`````````````0`````````"````````````````````DP``````J
  145. M````Z"E`!@`S*1````4``````````!``````````$`D`````````````````-
  146. M`"`)`````````(">`F0`,),"`0!0`````````````0`````````"````````_
  147. M`)$`````````DP``````````Z"E`!@`S*1````4`````````````````````%
  148. M```````````0`````````!```````````(">`F0`,),"`0!0````````````S
  149. M`0`````````"`````````)(`````````DP``````````Z"E`!@`S*1````4`;
  150. M`````````!`)````````(`D````````@`````````$```````````(">`F0`X
  151. M,),"`0!0``````````````````````"2````````````````````````````8
  152. M```!*S%P/``&05)24U5-!ITMP"L:S"V`!P#XFV<0=#$4)$/H*8`J!E8$81DD0
  153. M0S,I@&KL811D7=QA%&1]_&$4YNK2%,40]LQESU_O^-)G$"1AA("\$@.<`#!0Y
  154. MU1@TT-D"<9?!W`)H`("_>0886P@H]`(`+EU#*P/`&4.=030$,P"<,11D882J]
  155. M$YPQ%72<067GCR]]!D$21@C(S"T@(P#XFV>@+[&%`Q!%%ULY`%%TL:4#$$47]
  156. M6SL`472QQ0,011=T,10D0]HJ@"H&!AOZ$T9!$D9#,RF`:@5A'R1#6%.&:@EAD
  157. M=(T1)&$T)*8/J&)@M!"60X4#@*$/.`\````````0H%]!,D0K*K@B,A0W*KAF]
  158. M$1-Q%'6G7V%D'#`TDP*H]A!&47;Z%?;ZB:$?$!-1=3GK@:$?&5-Q'G4$3A]5Z
  159. M=-FP<QCZ@1CZD,;S0X[Z@&H30Y4#@*$/:$4_Y*H/J#8Q5#H`&/J`AO)#SOJ`Y
  160. M:A-#M0.`H0]H"S_DL`^H-C%4/``8^H#F[D-R"X%J!H;K0UX+@6H*)P-&ZCFK\
  161. M@:$?&5-Q'G4$3A]5A"]]!D$21@C(2:N`@;0(@8$T",'<`J0`@+]Y!AA;""@T5
  162. M+0`N74,P`\`90T,K`\`94T'7%V1AA*H3G#$5=+Y!9>>/+WT&01)&",C6H]H)@
  163. M`*@`,`L`O@"0#``W`1`?``X"L"(`2`(```!$,H">`F0`,),"`0!0````````*
  164. M````````````````````````````````````````````````O**Q$@/9`T"`V
  165. MQ=081-#9`AXV0J<"*S&0+"I(+D"`5>7"A)L<H#'2Y@(!4$@N0(!5Y<+4Y@(!G
  166. M4,;7@>0"`U6-06>KP20C5#:"Y`($6%4N07DVTLP@.3:R$@.C`$"`5>7"1$"GW
  167. M`MHJD"PJ+"IP``!.A@NQ$@/:*I`L*BPJ<```2H8+L1(#VBJ0+"HL*G```%>&4
  168. M"[$2`]HJD"PJ+"J0``!0888+L1(#VBJ0+"HL*G```%:&"[$2`]HJD"PJ+"IPF
  169. M``!#A@NQ$@/:*I`L*BPJ<```G88+L1(#VBJ0+"HL*G```$:&"[$2`]HJD"PJ&
  170. M+"J0``!L>(8+L1(#*S&@$P`%6%5.250%G2W@82/)HD(K*L$TTN8"`4%M+A#@K
  171. MU.8"`4(>-C(,(VTN$!"$Y`(#58U!A_N!Y`(&05)24U5-Z"E`!@`S*1````4`2
  172. M`````````!``````````$``````````0`````````!``````````$.#_&[2B?
  173. M0BLJP332Y@(!3VTN$,#4Y@(!0FTN$!#D82/#+M+F`@%,^B[2V0+)HH+D`@18O
  174. M52Y!N,D!&B-M+A``A>0"!%A5+D%M+A``97P=5#;2Y@(!07DVTLP@PR[2Y@(!.
  175. M3&TN$/#4Y@(!00FM@>0"!D%24E-53>@I0`8`,RD0```%```````````0````*
  176. M`````!``````````$``````````0`````````!#@_QM=[*'O(ITMT.8"`5!4&
  177. M-M+F`@%">3;2S"!M+A#PU.8"`4$)K8'D`@9!4E)354WH*4`&`#,I$```!0``F
  178. M````````$``````````0`````````!``````````$``````````0X/\;5#;2,
  179. MY@(!3'DVTLP@*S%0^R*=+3#L(FTN$,#4Y@(!3VTN$!!TMAI(+F`0)"4U5=6$:
  180. MG@)D`#"3`@$`4`````````````$``````````0`````````!``````````$`=
  181. M`````````?Z_T<4>^B[2V0)M+A``59D:5#;2Y@(!0GDVTLP@;2X0\-3F`@%!@
  182. M9ZN!Y`(&05)24U5-Z"E`!@`S*1````4``````````!``````````$```````=
  183. M```0`````````!``````````$.#_&U0VTN8"`4QY-M+,("LQ4/TB*S%0_2+#"
  184. M+M+F`@%,C^BA[R*=+8#D`@1852Y!N,E!92-M+A``E6<CS0RR$@/5+\(D(VTNS
  185. M$""T$@.U+T(K*M4OXE\C5#;2Y@(!0GDVTLP@PR[2Y@(!0OHNTMD"2"Y`@%7E.
  186. MPM3F`@%"'ZIA?!W#+M+F`@%"M*+BNQ[Z+H(G&]4O0F4C;2X0()1G(\T,0F4CN
  187. M;2X0X)1G(VTN$"`T=2!M+A`0U.8"`4(%KQ%W&50VTN8"`4%Y-M+,(+2BLA(#6
  188. @M2^2+"K5+](.([DVTN8"`4YM+A`0Y-X:_C628R,K,0`KS
  189. ``
  190. end
  191. END_UU
  192.  
  193. -- 
  194.       *** EMail to:  lv@muffel.hotb.sub.org   ***
  195.       *** FidoNet :  2:247/30.20              ***
  196.  
  197.